const {resolve} = require("path");
//html编译
const HtmlWebpackPlugin = require("html-webpack-plugin")

module.exports = {
    mode:"development",
    entry:"./src/main.js",
    output:{
        filename:"js/bundle.js",
        path:resolve(__dirname,"build")
    },
    module:{
        rules:[
            {
                test:/\.js$/,
                exclude:/node_module/,
                use:[
                   {
                    loader:"eslint-loader",
                    options:{
                        fix:true
                    }
                   } 

                ]
            },

        ]
    },
    plugins:[
        new HtmlWebpackPlugin()
    ]
}